from django.db import models

# Create your models here.
class Feedback(models.Model):
    file = models.ForeignKey(
        "main.Files",  # 或者使用 Files（如果已经在上面定义了）
        verbose_name='文件',
        on_delete=models.CASCADE,
        related_name='feedbacks'
    )

    # 使用字符串引用 user.CustomUser
    sender = models.ForeignKey(
        "user.CustomUser",
        verbose_name='反馈者',
        on_delete=models.CASCADE
    )
    title = models.CharField("标题", max_length=120)  # 文章标题
    content = models.TextField("反馈内容")
    created = models.DateTimeField(auto_now_add=True)

    class Meta:
        verbose_name = "反馈"
        ordering = ["-created"]